<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1,maximum-scale=1">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<script src="../js/html5.js" type="text/javascript"></script>
<script src="../js/jquery-1.11.2.min.js" type="text/javascript"></script>
<script src="../js/angularJS-1.4.js" type="text/javascript"></script>
<script src="../js/angular-file-upload.js"></script>
<script src='../js/bootstrap.js'></script>
<script src='../js/jquery.colorpicker.js'></script>
<script src="../js/textEditorControl.js" type="text/javascript"></script> 
<link rel='stylesheet' href='../bootstrap.css'>
<link type="text/css" href="../textEditor.css" rel="stylesheet" /> 
<body style="overflow:hidden;">
<div class="editorPage" id="ng-app" ng-app="textEditor" ng-controller="editorController" data-ng-init="onLoad()">
	<table style="width:100%;">
  	<tr>
  		<td>
  			<div class="editorTop">
  				<ul>
  					<li style="margin-left:80px;"><a href="javascript:void(0)" ng-click="clickAddTitle()">标题</a></li>
  					<li class="lineLi" style="width:3px;"></li>
  					<li><a href="javascript:void(0)" ng-click="addContent()">正文</a></li>
  					<li class="lineLi" style="width:3px;"></li>
  					<li><a href="javascript:void(0)" ng-click="addImage()">图片</a></li>
  					<li class="lineLi" style="width:3px;"></li>
  					<!-- <li><a href="javascript:void(0)" ng-click="addAudio()">音频</a></li>
  					<li class="lineLi" style="width:3px;"></li> -->
  					<li><a href="javascript:void(0)" ng-click="addVideo()">视频</a></li>
  					<li class="lineLi" style="width:3px;"></li> 
  					<!-- <li><a href="javascript:void(0)" ng-click="clickAddMedia()">多媒体</a></li>
  					<li class="lineLi" style="width:3px;"></li> -->
  					<!-- <li><a href="javascript:void(0)" ng-click="addDoc()">附件</a></li>
  					<li class="lineLi" style="width:3px;"></li> -->
  					<li><a href="javascript:void(0)" ng-click="setParam()">全局设置</a></li>
  					<!-- <li class="lineLi" style="width:3px;"></li>
  					<li><a href="javascript:void(0)" ng-click="showResource()">资源库</a></li> --> 
  				</ul>
  				<button type="button" class="close" ng-click="closeEditor()" style="margin-right:10px;margin-top:15px;float:right;">
					  &times;
				</button>
  			</div>
  			<div ng-if="addTitleFlag==true" style="left:80px;" class="editorTopHover" ng-mouseleave="onPageClick()">
  				<div class="addTitleTop"></div>
  				<div class="addTitleCenter">
  				<ul>
  					<li ng-click="addTitle(3)"><a href="javascript:void(0)"><h3>标题1</h3></a></li>
  					<li ng-click="addTitle(2)"><a href="javascript:void(0)"><h2>标题2</h2></a></li>
  					<li ng-click="addTitle(1)"><a href="javascript:void(0)"><h1>标题3</h1></a></li>
  				</ul>
  				</div>
  				<div class="addTitleBottom"></div>
  			</div>
  			<div ng-if="addDocFlag==true" class="editorTopHover" style="left:320px;" ng-mouseleave="onPageClick()">
  				<div class="addTitleTop"></div>
  				<div class="addTitleCenter">
  				<ul>
  					<li ng-click="addPdf()"><a href="javascript:void(0)"><h3>PDF</h3></a></li>
  					<li ng-click="addWord()"><a href="javascript:void(0)"><h3>WORD</h3></a></li>
  					<li ng-click="addOther()"><a href="javascript:void(0)"><h3>其他附件</h3></a></li>
  				</ul>
  				</div>
  				<div class="addTitleBottom"></div>
  			</div>
  			<div ng-if="addMediaFlag==true" class="editorTopHover" style="left:240px;" ng-mouseleave="onPageClick()">
  				<div class="addTitleTop"></div>
  				<div class="addTitleCenter">
  				<ul>
  					<li ng-click="addImage()"><a href="javascript:void(0)"><h3>图片</h3></a></li>
  					<!-- <li ng-click="addAudio()"><a href="javascript:void(0)"><h3>音频</h3></a></li> -->
  					<li ng-click="addVideo()"><a href="javascript:void(0)"><h3>视频</h3></a></li>
  				</ul>
  				</div>
  				<div class="addTitleBottom"></div>
  			</div>
  		</td>
  	</tr>
  	
  	<tr>
  		<td style="position:relative;">
  			<div style="margin-left:100px;float:left;">
  			<table>
  				<tr>
  					<td>
  					<div class="phoneTop"></div>
  					</td>
  				</tr>
  				<tr>
  					<td class="phoneCenter">
  					<div class="phoneMain" style="width:284px;height:480px;overflow-y:scroll;margin-left:3px;" ng-click="onPageClick()">
  						<div ng-style="pageStyle">
  						<div class="elementObj" ng-repeat="element in elementArr" id="{{element.id}}" style="max-width:100%;"  ondrop="drop(event)" ondragover="allowDrop(event)">
  							<h1  ng-class="{true:'active'}[element.checked]" ng-style="element" style="word-break: break-all; word-wrap:break-word;" ng-if="element.type=='title'&&element.fontSizeFlag=='1'" contentEditable="plaintext-only" ng-model="element.content" content-editable  ng-click="clickItem($event,element.id)" ng-mousedown="focusElement($event,element.id)" ></h1>
  							<h2  ng-class="{true:'active'}[element.checked]" ng-style="element" style="word-break: break-all; word-wrap:break-word;" ng-if="element.type=='title'&&element.fontSizeFlag=='2'" contentEditable="plaintext-only" ng-model="element.content" content-editable  ng-click="clickItem($event,element.id)" ng-mousedown="focusElement($event,element.id)" ></h2>
  							<h3  ng-class="{true:'active'}[element.checked]" ng-style="element" style="word-break: break-all; word-wrap:break-word;" ng-if="element.type=='title'&&element.fontSizeFlag=='3'" contentEditable="plaintext-only" ng-model="element.content" content-editable  ng-click="clickItem($event,element.id)" ng-mousedown="focusElement($event,element.id)" ></h3>
  							<p  ng-class="{true:'active'}[element.checked]" ng-style="element" style="word-break: break-all; word-wrap:break-word;" ng-if="element.type=='content'" contentEditable="plaintext-only" ng-model="element.content" content-editable ng-click="clickItem($event,element.id)" ></p>
  							
  							<!-- <div style="text-align:center;" ng-if="element.type=='image'"  > -->
  							<img ng-if="element.type=='image'"  ng-src="{{trustSrc(element.imagesSrc[0].path)}}" ng-style="element" ng-model="element.imagesSrc[0].path" ng-class="{true:'active'}[element.checked]" draggable="true" ng-click="clickItem($event,element.id)" ondragstart="drag(event)"/>
  							<!-- <span>{{element.imagesSrc[0].title}}</span>
  							</div> -->
  							<!-- <div style="text-align:center;" ng-if="element.type=='video'" > -->
  							<img ng-if="element.type=='video'&&element.coverImg==''"  src="../images/addCover.png" ng-style="element" style="width:100%;"  ng-model="element.coverImg" ng-class="{true:'active'}[element.checked]" ng-click="clickItem($event,element.id)" draggable="true" ondragstart="drag(event)">
  							<img ng-if="element.type=='video'&&element.coverImg!=''"  ng-src="{{trustSrc(element.coverImg)}}" ng-style="element" style="width:100%;"  ng-model="element.coverImg" ng-class="{true:'active'}[element.checked]" ng-click="clickItem($event,element.id)" draggable="true" ondragstart="drag(event)"> 
  							<!-- <span>{{element.videoTitle}}</span>
  							</div> -->
  							
  							<!-- <video ng-if="element.type=='video'"  width="100%" controls="controls" style="display:none;">
								<source ng-src="{{trustSrc(element.src)}}" type="video/mp4"> 
								<source ng-src="{{trustSrc(element.src)}}" type="video/ogg"> 
								<source ng-src="{{trustSrc(element.src)}}" type="video/webm"> 
							</video> -->
							
							<div style="position:relative;" ng-if="element.type=='audio'" ng-style="element" ng-class="{true:'active'}[element.checked]" draggable="true" ng-click="clickAudioItem($event,element.id)" ondragstart="drag(event)" >
								<img src="../images/audio.png" style="width:150px;" />
								<h3 style="border-top:2px solid #666;color:orange;margin-top:0px;margin-bottom:10px;">{{element.audioTitle}}</h3>
								<img src="../images/btn_sound_nor.png" style="position:absolute;top:15px;right:0px;width:30px;"/>
								<!-- <audio id="hidden_{{element.id}}" ng-if="element.type=='audio'" ng-src="{{trustSrc(element.src)}}" controls="controls" style="display:none;"> -->
							</div>
							
							<div style="position:relative;" ng-if="element.type=='pdf'||element.type=='word'" ng-style="element" ng-class="{true:'active'}[element.checked]" draggable="true" ng-click="clickItem($event,element.id)" ondragstart="drag(event)" >
								<img src="../images/read.png" style="width:150px;" />
								<h3 style="border-top:2px solid #666;color:orange;margin-top:0px;margin-bottom:10px;">{{element.title}}</h3>
								<img src="../images/btn_book_nor.png" style="position:absolute;top:15px;right:0px;width:30px;"/>
								
							</div>
							<div style="position:relative;" ng-if="element.type=='accessory'" ng-style="element" ng-class="{true:'active'}[element.checked]" draggable="true" ng-click="clickItem($event,element.id)" ondragstart="drag(event)" >
								<img src="../images/bg_other_element.png" style="width:150px;" />
								<h3 style="border-top:2px solid #666;color:orange;margin-top:0px;margin-bottom:10px;">{{element.title}}</h3>
								<img src="../images/icon_other_element.png" style="position:absolute;top:15px;right:0px;width:30px;"/>
								
							</div>
						</audio> 
  						</div>
  						</div>
  					</div>
  					</td>
  				</tr>
  				<tr>
  					<td>
  					<div class="phoneBottom"></div>
  					</td>
  				</tr>
  				
  			</table>
  			</div>
  			<div style="position:absolute;top:60px;left:65px;width:30px;height:40px;border:1px solid #ddd;text-align:center;cursor:pointer;" ng-click="goUp()">
  				上移
  			</div>
  			<div style="position:absolute;top:110px;left:65px;width:30px;height:40px;border:1px solid #ddd;text-align:center;cursor:pointer;" ng-click="goDown()">
  				下移
  			</div>
  			<div class="allAttrDiv" ng-if="checkedItemId!=null" style="height:500px;overflow-y:auto;">
  				<table style="width:100%;">
  					<tr ng-if="allElements[checkedItemId].type=='title'">
  					<td class="attrSet">标题设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='content'">
  					<td class="attrSet">正文设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='image'">
  					<td class="attrSet">图片设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  					<td class="attrSet">音频设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  					<td class="attrSet">视频设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='pdf'">
  					<td class="attrSet">PDF设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='word'">
  					<td class="attrSet">WORD设置</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='accessory'">
  					<td class="attrSet">其他附件设置</td>
  					</tr>
  					<tr ng-if="setParamFlag">
  					<td class="attrSet">全局设置</td>
  					</tr>
  					<tr ng-if="setParamFlag">
  					<td class="titleTop">样式</td>
  					</tr>
  					<tr ng-if="setParamFlag">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">整体距上
  								<span style="float:right;"><input type="text" ng-model="page.marginTop" style="width:80px;" ng-change="changeMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">整体距下
  								<span style="float:right;"><input type="text" ng-model="page.marginBottom" style="width:80px;" ng-change="changeMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">整体距左
  								<span style="float:right;"><input type="text" ng-model="page.marginLeft" style="width:80px;" ng-change="changeMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">整体距右
  								<span style="float:right;"><input type="text" ng-model="page.marginRight" style="width:80px;" ng-change="changeMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='title'
  					||allElements[checkedItemId].type=='content'
  					||allElements[checkedItemId].type=='image'
  					||allElements[checkedItemId].type=='audio'
  					||allElements[checkedItemId].type=='video'
  					||allElements[checkedItemId].type=='pdf'
  					||allElements[checkedItemId].type=='word'
  					||allElements[checkedItemId].type=='accessory'">
  					<td class="titleTop">样式</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='title'
  					||allElements[checkedItemId].type=='content'
  					||allElements[checkedItemId].type=='image'
  					||allElements[checkedItemId].type=='audio'
  					||allElements[checkedItemId].type=='video'
  					||allElements[checkedItemId].type=='pdf'
  					||allElements[checkedItemId].type=='word'
  					||allElements[checkedItemId].type=='accessory'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">距上一元素
  								<span style="float:right;"><input type="text" ng-model="allElements[checkedItemId].marginTopStyle" style="width:80px;" ng-change="changeItemMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							<tr>
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">距下一元素
  								<span style="float:right;"><input type="text" ng-model="allElements[checkedItemId].marginBottomStyle" style="width:80px;" ng-change="changeItemMargin()"/>px</span>
  							</div>
  							</td>
  							</tr>
  							
  							<tr ng-if="allElements[checkedItemId].type=='content'||allElements[checkedItemId].type=='title'">
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">文字位置
  								<select style="text-align: center;font-size: 14px;width: 50px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].textAlign">
  								<option value="left">左</option>
  								<option value="center">中</option>
  								<option value="right">右</option>
  								</select>
  							</div>
  							</td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='title'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">文字大小
  								<select style="text-align: center;font-size: 14px;width: 60px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].fontSizeFlag">
  								<option value="3">标题1</option>
  								<option value="2">标题2</option>
  								<option value="1">标题3</option>
  								</select>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">文字大小
  								<select style="text-align: center;font-size: 14px;width: 60px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].fontSize">
  								<option value="12px">12px</option>
  								<option value="14px">14px</option>
  								<option value="16px">16px</option>
  								<option value="18px">18px</option>
  								<option value="20px">20px</option>
  								</select>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">段落样式
  								<select style="text-align: center;font-size: 14px;width: 80px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].textIndent">
  								<option value="">无</option>
  								<option value="2em">首行缩进</option>
  								</select>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">行间距
  								<select style="text-align: center;font-size: 14px;width: 80px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].lineHeight">
  								<option value="100%">1倍</option>
  								<option value="150%">1.5倍</option>
  								<option value="200%">2倍</option>
  								</select>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'||allElements[checkedItemId].type=='title'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">字体颜色
  							<div style="float:right;">
  								<input type="text" id="fontColor" style="width:70px;" disabled/><a href="javaScript:void(0)" onclick="fontColorEvent(event)"><img src='../images/colorChoose.png' style="width:20px;height:20px;"></a>
  							</div>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'||allElements[checkedItemId].type=='title'">
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">字体背景色
  							<div style="float:right;">
  								<input type="text" id="fontBgColor" style="width:70px;" disabled/><a href="javaScript:void(0)" onclick="fontBgColorEvent(event)"><img src='../images/colorChoose.png' style="width:20px;height:20px;"></a>
  							</div>
  							</div></td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'||allElements[checkedItemId].type=='title'">
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;position:relative;" ng-click="addFontStyleEvent()">字体样式
  								<a href="javaScript:void(0)">
  								<div class="fontStyleDiv"  ng-mouseleave="leaveFontStyle()" style="top:0px;right:10px;">
  									<ul>
  										<li ng-class="{true:'fontStyleActive'}[currentFontWeight]"  ng-click="fontWeight()">
  										<span style="vertical-align:baseline;-webkit-box-sizing:content-box;width:20px;display:inline-block;background:url(../images/icons.png) no-repeat 0 -22px !important;">&nbsp;</span>
  										</li>
  										<li ng-class="{true:'fontStyleActive'}[currentFontStyle]"  ng-click="fontStyle()">
  										<span style="vertical-align:baseline;-webkit-box-sizing:content-box;width:20px;display:inline-block;background:url(../images/icons.png) no-repeat 0 -46px !important;">&nbsp;</span>
  										</li>
  										<li ng-class="{true:'fontStyleActive'}[currentTextDecoration]" ng-click="textDecoration()">
  										<span style="vertical-align:baseline;-webkit-box-sizing:content-box;width:20px;display:inline-block;background:url(../images/icons.png) no-repeat 0 -142px !important;">&nbsp;</span>
  										</li>
  									</ul>
  								</div>
  								</a>
  							</div>
  							</td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='image'">
  							<td>
  							<div style="border:1px solid #333;font-size:14px;padding:8px;">
  							<table class="imageTable">
  								<tr>
  									<td  rowspan="2">
  										尺寸
  									</td>
  									<td>
  										<input type="radio" name="picSize" value="Y" ng-model="allElements[checkedItemId].isNormalSize" style="width:15px;" ng-click="imageSizeChange(true,true)"/><label style="font-weight:inherit;">默认尺寸</label>
  									</td>
  								</tr>
  								<tr>
  									<td>
  										<input type="radio" name="picSize" value="N" ng-model="allElements[checkedItemId].isNormalSize" style="width:15px;" ng-click="imageSizeChange(false,true)"/><label style="font-weight:inherit;">自定义尺寸</label>
  									</td>
  								</tr>
  								<tr ng-if="allElements[checkedItemId].isNormalSize=='N'">
  									<td colspan="2">
  										<!-- <img src="../images/lock.png" ng-if="allElements[checkedItemId].imageWidthLock==true" style="width:15px;" ng-click="changeLock(false,true)"/>
										<img src="../images/unlock.png" ng-if="allElements[checkedItemId].imageWidthLock==false" style="width:20px;" ng-click="changeLock(true,true)"/> -->
										<label style="font-weight:inherit;font-size:14px;"">宽度：</label>
										<input type="text" name="picWidth" ng-model="allElements[checkedItemId].width" style="width:40px;" />
										<!-- <input type="text" name="picWidth" ng-model="allElements[checkedItemId].width" style="width:40px;" ng-change="changeWidthEvent(allElements[checkedItemId].width,true)"/> -->
							
										<label style="font-weight:inherit;font-size:14px;">高度：</label>
										<input type="text" name="picHeight" ng-model="allElements[checkedItemId].height" style="width:40px;"/>
										<!-- <input type="text" name="picHeight" ng-model="allElements[checkedItemId].height" style="width:40px;" ng-change="changeHeightEvent(allElements[checkedItemId].height,true)"/> -->
  									</td>
  								</tr>
  							</table>
								
  							</div>
  							</td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='content'">
  								<td class="titleTop">背景图片</td>
  							</tr>
  							<tr ng-if="allElements[checkedItemId].type=='content'">
  								<td>
  								<table class="attrTable">
  								<tr>
  									<td>
  									<div ng-if="allElements[checkedItemId].backgroundImage!=''" class="upload_btn"  ng-style="allElements[checkedItemId]" style="width:150px;height:150px;background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                 				<input type="file" class="btn"  nv-file-select="" uploader="uploaderBgImage" multiple="" 
		                 		accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              				</div>
		              				<div ng-if="allElements[checkedItemId].backgroundImage==''" class="upload_btn" style="width:150px;height:150px;background-image:url(../images/addImage.png);background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                				 <input type="file" class="btn"  nv-file-select="" uploader="uploaderBgImage" multiple="" 
		                		 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              				</div>
									</td>
  								</tr>
  							
  								</table>
  							</td>
  					</tr>
  					<!--<tr ng-if="allElements[checkedItemId].type=='title'||allElements[checkedItemId].type=='content'">
  					<td class="titleTop">超链接</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='title'||allElements[checkedItemId].type=='content'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">点击效果
  								<select style="text-align: center;font-size: 14px;width: 80px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].isClickChange">
  								<option value="Y">点击放大</option>
  								<option value="N">无效果</option>
  								</select>
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>-->
  					<tr ng-if="allElements[checkedItemId].type=='image'">
  					<td class="titleTop">效果</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='image'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="border:1px solid #333;font-size:14px;padding:8px;">点击效果
  								<select style="text-align: center;font-size: 14px;width: 80px;border: none;background-color: initial;float: right;" ng-model="allElements[checkedItemId].isClickChange">
  								<option value="Y">点击放大</option>
  								<option value="N">无效果</option>
  								</select>
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='image'">
  					<td class="titleTop">图片</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='image'">
  					<td style="padding:5px;">
  						<div ng-repeat="imgElement in allElements[checkedItemId].imagesSrc" class="upload_btn" style="width:190px;padding:0px;float:left;margin-right:10px;margin-bottom:10px;">
		                 <div style="width:100%;border:1px solid #ccc;position:relative;">
		                 <div style="width:100%;height:120px;background-image:url({{imgElement.path}});background-size:190px 120px;overflow:hidden;">
		                 <input type="file" class="btn"  nv-file-select="" uploader="uploaderImg" multiple="" 
		                 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:120px;width:190px;opacity:0;font-size:200px;" ng-click="imageClickUpload2($index)">
		                 </div>
		                 <button type="button" class="close" style="position:absolute;color:red;top:0px;right:5px;" ng-click="removeImg($index,true)">
					  &times;
				</button>
		                 <input type="text" style="width:100%;border:none;text-align:center;"  ng-model="imgElement.title" placeholder="标题"/>
		                 </div>
		                 <table style="width:100%;">
		                 
		                 <!-- <tr>
		                 	<td style="text-align:left;padding-top:5px;"><input ng-class="{true:'hrefFlagActive'}[imgElement.hrefType=='In']" style="width:70px;font-size:14px;" type="button" value="码内跳转"  ng-click="inCode($index,true)"/></td>
		                 	<td style="text-align:right;padding-top:5px;"><input ng-class="{true:'hrefFlagActive'}[imgElement.hrefType=='Out']" style="width:70px;font-size:14px;" type="button" value="码间跳转" ng-click="outCode($index,true)"/></td>
		                 </tr> -->
		                 <tr>
		                 	<td colspan="2" style="padding-top:5px;">
		                 	<textarea rows="2" style="width:190px;resize:none;" class="tpHrefClass{{$index}}" hideIndex="{{$index}}" ng-model="imgElement.href" oninput="OnInput (true,this.getAttribute('hideIndex'))" onpropertychange="OnPropChanged (true,this.getAttribute('hideIndex'))" placeholder="超链接">{{imgElement.href}}</textarea>
		                 	
		                 </tr>
		                 </table> 
		                 
		                 
		              </div>
		              <div ng-if="allElements[checkedItemId].imagesSrc.length<5" class="upload_btn" style="height:120px;width:190px;background-image:url(../images/addImage.png);background-size:150px 150px;padding:0px;float:left;overflow:hidden;">
		                 <input type="file" class="btn"  nv-file-select="" uploader="uploaderImg" multiple="" 
		                 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:120px;width:190px;opacity:0;font-size:200px;">
		              </div> 
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  						<td class="titleTop">标题</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="font-size:14px;height:30px;">
  								<input type="text" ng-model="allElements[checkedItemId].audioTitle" style="width:100%;height:100%;">
  								
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  						<td class="titleTop">内容</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><textarea rows="5"  ng-model="allElements[checkedItemId].audioContent" >{{allElements[checkedItemId].audioContent}}</textarea></td>
  							</tr>
  							
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  						<td class="titleTop">背景图片</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='audio'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td>
  							<div ng-if="allElements[checkedItemId].audioCoverImg!=''" class="upload_btn" style="width:150px;height:150px;background-image:url({{allElements[checkedItemId].audioCoverImg}});background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                 		<input type="file" class="btn"  nv-file-select="" uploader="uploaderAudioCoverChange" multiple="" 
		                 		accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              		</div>
		              		<div ng-if="allElements[checkedItemId].audioCoverImg==''" class="upload_btn" style="width:150px;height:150px;background-image:url(../images/addImage.png);background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                		 <input type="file" class="btn"  nv-file-select="" uploader="uploaderAudioCoverChange" multiple="" 
		                		 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              		</div>
							</td>
  							</tr>
  							
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  						<td class="titleTop">标题</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="font-size:14px;height:30px;">
  								<input type="text" ng-model="allElements[checkedItemId].videoTitle" style="width:100%;height:100%;">
  								
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  						<td class="titleTop">封面图片</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td>
  							<div ng-if="allElements[checkedItemId].coverImg!=''" class="upload_btn" style="width:150px;height:150px;background-image:url({{allElements[checkedItemId].coverImg}});background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                 		<input type="file" class="btn"  nv-file-select="" uploader="uploaderVideoCoverChange" multiple="" 
		                 		accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              		</div>
		              		<div ng-if="allElements[checkedItemId].coverImg==''" class="upload_btn" style="width:150px;height:150px;background-image:url(../images/addImage.png);background-size:150px 150px;padding:0px;margin-left:auto;margin-right:auto;overflow:hidden;">
		                		 <input type="file" class="btn"  nv-file-select="" uploader="uploaderVideoCoverChange" multiple="" 
		                		 accept="image/jpg,image/png,image/jpeg,image/bmp,image/gif" style="padding:0px;height:150px;width:150px;opacity:0;font-size:200px;">
		              		</div>
							</td>
  							</tr>
  							
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  						<td class="titleTop">修改视频</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='video'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td>
  							<textarea rows="3" ng-model="allElements[checkedItemId].src" disabled>{{allElements[checkedItemId].src}}</textarea>
  							<!-- <div ng-if="allElements[checkedItemId].src==''" class="upload_btn" style="width:200px;height:100px;background-image:url(../images/addVideo.png);background-size:280px 140px;padding:0px;border:1px solid #ccc;margin-left:auto;margin-right:auto;">
		                 	<input type="file" class="btn"  nv-file-select="" 
		                 	uploader="uploaderVideoChange" accept="video/quicktime,video/x-mpeg2,video/x-msvideo,video/mp4" style="padding:0px;height:100px;width:200px;opacity:0;"/>
		             		</div> 
		              		<div ng-if="allElements[checkedItemId].src!=''" class="upload_btn" style="width:200px;height:100px;padding:0px;vertical-align: middle;margin-left:auto;margin-right:auto;position:relative;">
		               			<video ng-if="allElements[checkedItemId].src!=''" width="200px"  controls="controls">
									<source ng-src="{{trustSrc(allElements[checkedItemId].src)}}" type="video/mp4"> 
								</video>
		                 		<input type="file" class="btn"  nv-file-select="" uploader="uploaderVideoChange" multiple="" 
		                 		accept="video/quicktime,video/x-mpeg2,video/x-msvideo,video/mp4" style="padding:0px;height:100px;width:200px;opacity:0;position:absolute;top:0px;">
		             		 </div> -->
							</td>
  							</tr>
  							
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='pdf'||allElements[checkedItemId].type=='word'||allElements[checkedItemId].type=='accessory'">
  						<td class="titleTop">标题</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='pdf'||allElements[checkedItemId].type=='word'||allElements[checkedItemId].type=='accessory'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="font-size:14px;height:30px;">
  								<input type="text" ng-model="allElements[checkedItemId].title" style="width:100%;height:100%;">
  								
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='pdf'||allElements[checkedItemId].type=='word'||allElements[checkedItemId].type=='accessory'">
  						<td class="titleTop">路径</td>
  					</tr>
  					<tr ng-if="allElements[checkedItemId].type=='pdf'||allElements[checkedItemId].type=='word'||allElements[checkedItemId].type=='accessory'">
  					<td>
  						<table class="attrTable">
  							<tr>
  							<td><div style="font-size:14px;height:60px;">
  								<textarea rows="4" ng-model="allElements[checkedItemId].src" style="width:100%;resize:none;" disabled>{{allElements[checkedItemId].src}}</textarea>
  								
  							</div></td>
  							</tr>
  						</table>
  					</td>
  					</tr>
  					<tr>
  					<td style="text-align:center;padding-top:20px;padding-botttom:20px;">
  					<div ng-if="allElements[checkedItemId].type=='pdf'||allElements[checkedItemId].type=='word'||allElements[checkedItemId].type=='accessory'"  style="float:left;background-color:#31364a;color:#fff;width:54px;height:34px;text-align:center;line-height:34px;margin-left:30px;border-radius:4px;overflow:hidden;">上传
  					<input ng-if="allElements[checkedItemId].type=='pdf'" type="file" value="上传1" class="btn"  nv-file-select="" uploader="uploaderPdfChange" multiple="" 
		                 style="padding:0px;width:60px;height:34px;opacity:0;margin-top:-34px;font-size:200px;"/> 
		            <input ng-if="allElements[checkedItemId].type=='word'" type="file" value="上传2" class="btn"  nv-file-select="" uploader="uploaderWordChange" multiple="" 
		                 style="padding:0px;width:60px;height:34px;opacity:0;margin-top:-34px;font-size:200px;"/>  
		            <input ng-if="allElements[checkedItemId].type=='accessory'" type="file" value="上传3" class="btn"  nv-file-select="" uploader="uploaderOtherChange" multiple="" 
		                 style="padding:0px;width:60px;height:34px;opacity:0;margin-top:-34px;font-size:200px;"/> 
  					</div>
  					<div ng-if="allElements[checkedItemId].type=='video'"  style="float:left;background-color:#31364a;color:#fff;width:54px;height:34px;text-align:center;line-height:34px;margin-left:30px;border-radius:4px;overflow:hidden;">上传
  					<input ng-if="allElements[checkedItemId].type=='video'" type="file" value="上传视频" class="btn" nv-file-select="" uploader="uploaderVideoChange" multiple="" 
		                 		accept="video/quicktime,video/x-mpeg2,video/x-msvideo,video/mp4" style="padding:0px;width:60px;height:34px;opacity:0;margin-top:-34px;font-size:200px;">
		            </div>
		            <input ng-if="allElements[checkedItemId].type=='title'||allElements[checkedItemId].type=='content'" type="button" value="超链接" class="btn"  style="background-color:#31364a;color:#fff;padding:4px 8px;" ng-click="addUrl()"/>
  					<input ng-if="checkedItemId!=null&&checkedItemId!=''" type="button" value="删除" class="btn"  style="background-color:#518ab0;color:#fff;padding:4px 8px;" ng-click="deleteElement($event,allElements[checkedItemId].id)"/>
  					<input ng-if="allElements[checkedItemId].type=='title'||allElements[checkedItemId].type=='content'" type="button" value="取消超链接" class="btn"  style="background-color:#ffd271;color:#c19268;padding:4px 8px;" ng-click="cancelHref()"/>
  					</td> 
  					</tr>
  					
  				</table>
  			</div>
  		</td>
  	</tr>
  	<tr>
  					<td style="text-align:center;padding-top:10px;">
  					<input ng-if="currentUploading" type="button" value="保存" class="btn"  style="background-color:aaa;color:#fff;margin-right:10px;" />
  					<input ng-if="!currentUploading" type="button" value="保存" class="btn"  style="background-color:#518ab0;color:#fff;margin-right:10px;" ng-click="saveElements()"/>
  					<input type="button" value="关闭" class="btn"  style="background-color:#518ab0;color:#fff;margin-left:10px;" ng-click="closeEditor()"/>
  					</td>
  				</tr>
  </table>
</div>
<div id="moadContent"></div>
<div id="resourceModal" class="modal fade"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="width:750px;">
<div class="modal-content">
</div>
</div>
</div>
<iframe id="elementShowFrame" src="elementShow.html" style="display:none;">
</iframe>
</body>  


